import Vue from 'vue'

const CODE = 'retCode'
const DATA = 'retData'
const MESSAGE = 'retMsg'
const SUCCESS = '0000'
const error = (err) => {
  Vue.prototype.$message.error(((err.response || {}).data || {}).retMsg || err.retMsg || '请求出现错误，请稍后再试')
}
const warn = (err) => {
  Vue.prototype.$message.warn(((err.response || {}).data || {}).retMsg || err.retMsg || '请求出现错误，请稍后再试')
}

export default { CODE, DATA, MESSAGE, SUCCESS, error, warn }
